{{#d-modal-body class="feature-topic"}}
  {{#if model.pinned_at}}
    <div class="feature-section">
      <div class="desc">
        {{#if model.pinned_globally}}
          <p>
            {{#conditional-loading-spinner size="small" condition=loading}}
              {{#if pinnedGloballyCount}}
                {{{i18n "topic.feature_topic.already_pinned_globally" count=pinnedGloballyCount}}}
              {{else}}
                {{{i18n "topic.feature_topic.not_pinned_globally"}}}
              {{/if}}
            {{/conditional-loading-spinner}}
          </p>
          <p>{{i18n "topic.feature_topic.global_pin_note"}}</p>
        {{else}}
          <p>
            {{#conditional-loading-spinner size="small" condition=loading}}
              {{{alreadyPinnedMessage}}}
            {{/conditional-loading-spinner}}
          </p>
          <p>{{i18n "topic.feature_topic.pin_note"}}</p>
        {{/if}}
        <p>{{{unPinMessage}}}</p>
        <p>{{d-button action="unpin" icon="thumb-tack" label="topic.feature.unpin" class="btn-primary"}}</p>
      </div>
    </div>
  {{else}}
    <div class="feature-section">
      <div class="desc">
        <p>
          {{#conditional-loading-spinner size="small" condition=loading}}
            {{{alreadyPinnedMessage}}}
          {{/conditional-loading-spinner}}
        </p>
        <p>
          {{i18n "topic.feature_topic.pin_note"}}
        </p>
        <p class="with-validation">
          {{{pinMessage}}}
          {{fa-icon "clock-o"}}
          {{date-picker-future value=model.pinnedInCategoryUntil}}
          {{popup-input-tip validation=pinInCategoryValidation shownAt=pinInCategoryTipShownAt}}
        </p>
        <p>
          {{d-button action="pin" icon="thumb-tack" label="topic.feature.pin" class="btn-primary"}}
        </p>
      </div>
    </div>
    <hr>
    <div class="feature-section">
      <div class="desc">
        <p>
          {{#conditional-loading-spinner size="small" condition=loading}}
            {{#if pinnedGloballyCount}}
              {{{i18n "topic.feature_topic.already_pinned_globally" count=pinnedGloballyCount}}}
            {{else}}
              {{{i18n "topic.feature_topic.not_pinned_globally"}}}
            {{/if}}
          {{/conditional-loading-spinner}}
        </p>
        <p>
          {{i18n "topic.feature_topic.global_pin_note"}}
        </p>
        <p class="with-validation">
          {{i18n "topic.feature_topic.pin_globally"}}
          {{fa-icon "clock-o"}}
          {{date-picker-future value=model.pinnedGloballyUntil}}
          {{popup-input-tip validation=pinGloballyValidation shownAt=pinGloballyTipShownAt}}
        </p>
        <p>
          {{d-button action="pinGlobally" icon="thumb-tack" label="topic.feature.pin_globally" class="btn-primary"}}
        </p>
      </div>
    </div>
  {{/if}}
  <hr>
  <div class="feature-section">
    <div class="desc">
      <p>
        {{#conditional-loading-spinner size="small" condition=loading}}
          {{#if bannerCount}}
            {{{i18n "topic.feature_topic.banner_exists"}}}
          {{else}}
            {{{i18n "topic.feature_topic.no_banner_exists"}}}
          {{/if}}
        {{/conditional-loading-spinner}}
      </p>
      <p>
        {{i18n "topic.feature_topic.banner_note"}}
      </p>
      <p>
        {{#if model.isBanner}}
          {{i18n "topic.feature_topic.remove_banner"}}
        {{else}}
          {{i18n "topic.feature_topic.make_banner"}}
        {{/if}}
      </p>
      <p>
        {{#if model.isBanner}}
          {{d-button action="removeBanner" icon="thumb-tack" label="topic.feature.remove_banner" class="btn-primary"}}
        {{else}}
          {{d-button action="makeBanner" icon="thumb-tack" label="topic.feature.make_banner" class="btn-primary"}}
        {{/if}}
      </p>
    </div>
  </div>
{{/d-modal-body}}
<div class="modal-footer">
  <a class="pull-right" {{action "closeModal"}}>{{i18n "cancel"}}</a>
</div>
